     
    <h2>Quản lý sản phẩm</h2> 
    <a href="./index.php?act=2&sub=3" class="bt_green">
	    <span class="bt_green_lft"></span><strong>Thêm điện thoại mới</strong><span class="bt_green_r"></span>
   	</a>                   
<table id="rounded-corner" summary="2007 Major IT Companies' Profit">
    <thead>
    	<tr>
            <th scope="col" class="rounded-company">Mã</th>
            <th scope="col" class="rounded">Tên</th>
            <th scope="col" class="rounded">Nhà sản xuất</th>
            <th scope="col" class="rounded">Giá</th>
            <th scope="col" class="rounded">hình</th>
            <th scope="col" class="rounded">Ngày nhập</th>
            <th scope="col" class="rounded">Loại sản phẩm</th>
            <th scope="col" class="rounded">Xuất xứ</th>
            <th scope="col" class="rounded">Sửa</th>
            <th scope="col" class="rounded-q4">Xóa</th>
        </tr>
    </thead>
    <tfoot>
    	<tr>
        	<td class="rounded-foot-left">&nbsp;</td>
            <td colspan="8">&nbsp;</td>
        	<td class="rounded-foot-right">&nbsp;</td>
        </tr>
    </tfoot>
    <tbody>
    	<?php
			$sql = "SELECT d.madt, d.tendt, d.thongtinchitiet, n.tennhasanxuat, d.gia, d.hinh, d.ngaynhaphang, d.xuatxu, l.tenloaisanpham
FROM dt d, nhasanxuat n, loaisanpham l
WHERE d.manhasanxuat = n.manhasanxuat AND d.maloaisanpham = l.maloaisanpham ORDER BY d.madt";
			$result = DataProvider::ExecuteQuery($sql);
			while($row = mysql_fetch_array($result))
			{
				?>
                	<tr>
                        <td><?php echo $row["madt"]; ?></td>
                        <td><?php echo $row["tendt"]; ?></td>
                        <td><?php echo $row["tennhasanxuat"]; ?></td>
                        <td><?php echo $row["gia"]; ?></td>
                        <td><img src="../<?php echo $row["hinh"]; ?>" width="32"/></td>
                        <td><?php echo $row["ngaynhaphang"]; ?></td>
                        <td><?php echo $row["tenloaisanpham"]; ?></td>
                        <td><?php echo $row["xuatxu"]; ?></td>
                        <td><a href="./index.php?act=2&amp;sub=2&amp;id=<?php echo $row["madt"];?>"><img src="./images/user_edit.png" alt="" title="" border="0" /></a></td>
                        <td><a href="./index.php?act=2&sub=4&id=<?php echo $row["madt"];?>" class="ask"><img src="./images/trash.png" alt="" title="" border="0" /></a></td>
                    </tr>
                <?php	
			}
		?>
    </tbody>
</table>